package coml.jiyun.hp.zuoye.presenter;

import coml.jiyun.hp.zuoye.bean.WanBean;
import coml.jiyun.hp.zuoye.callback.WanCallBack;
import coml.jiyun.hp.zuoye.model.ImpWanModel;
import coml.jiyun.hp.zuoye.view.WanView;

public class ImpWanPresenter implements WanPresenter, WanCallBack {

    private ImpWanModel impWanModel;
    private WanView wanView;

    public ImpWanPresenter(ImpWanModel impWanModel, WanView wanView) {
        this.impWanModel = impWanModel;
        this.wanView = wanView;
    }

    @Override
    public void getData() {
        impWanModel.getData(this);
    }

    @Override
    public void onSuccess(WanBean wanBean) {
        wanView.onSuccess(wanBean);
    }

    @Override
    public void onFail(String str) {
        wanView.onFail(str);
    }
}